package com.itown.expo.controller.base;

import webframe.common.controller.BaseController;
import webframe.common.helper.AppConstant;

import com.itown.expo.service.ServiceContainer;

public abstract class MyBaseController extends BaseController {
	private ServiceContainer serviceContainer;
	private static String appPrefix;
	private static int backupCodeLength;

	public static String getAppPrefix() {
		if (appPrefix == null) {
			appPrefix = AppConstant.getAppPropValue("backupCodePrefix");
		}
		return appPrefix;
	}

	public static int getBackupCodeLength() {
		if (backupCodeLength < 1) {
			backupCodeLength = getAppPrefix().length();
		}
		return backupCodeLength;
	}

	public ServiceContainer getServiceContainer() {
		return serviceContainer;
	}

	public void setServiceContainer(ServiceContainer serviceContainer) {
		this.serviceContainer = serviceContainer;
	}
}
